// String -> MD5 string utility
// Copyright 2005 (C) Ralph Thomas

#ifndef UTIL_MD5_H
#define UTIL_MD5_H

#include <string>
#include <iostream>

namespace util {
	//
	// std::string md5( const std::string& source )
	// 
	/// Generate an MD5 from the source string and return it in string form.
	///
	/// \param	source	the input for the MD5.
	/// \return	the string form of an MD5 of the source string.
	//
	std::string md5( const std::string& source );
	//
	// std::string md5( std::streambuf* source, int count )
	//
	/// Sum the first count bytes of data from the specified source. If
	/// count is -1 then the entire source is summed.
	///
	/// \param	source	the input for the MD5
	/// \param	count	the number of bytes to sum.
	/// \return	the string form of an MD5.
	//
	std::string md5( std::streambuf* source, unsigned int count );
};

#endif

